package com.guigu.service.impl;

import com.guigu.dto.HealthPlanDTO;
import com.guigu.entity.HealthPlan;
import com.guigu.mapper.HealthPlanMapper;
import com.guigu.service.HealthPlanService;
import com.guigu.vo.HealthPlanVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
@Service
@Transactional
public class HealthPlanServicelmpl implements HealthPlanService {
    @Autowired
    private HealthPlanMapper hpmapper;
    @Override
    public List<HealthPlanVO> query(HealthPlanDTO dto) {
        return  this.hpmapper.query(dto);
    }

    @Override
    public Integer maxid() {

        return this.hpmapper.maxid();
    }

    @Override
    public int addHP(HealthPlan hp) {
        return this.hpmapper.addHP(hp);
    }

    @Override
    public int updatehp(HealthPlan hp) {
        return this.hpmapper.updadtehp(hp);
    }

    @Override
    public int deletehp(int id) {
        return this.hpmapper.deletehp(id);
    }
}
